package com.python.project2.vo;

import com.python.project2.db.domain.MarketCoupon;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @Description 优惠券VO
 * @Date 2023/4/1
 * @Author lixian
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CouponVO {
	private Integer id;
	private String name;
	private String desc;
	private String tag;
	private BigDecimal min;
	private Short days;
	private BigDecimal discount;

	public CouponVO(MarketCoupon coupon) {
		this(coupon.getId(), coupon.getName(), coupon.getDesc(), coupon.getTag(), coupon.getMin(), coupon.getDays(), coupon.getDiscount());
	}
}
